﻿using System;

namespace Metro.Demo.Model
{
    public class ProductModel: ObservableObject 
    {
        public int Id { get; set; }

        /// <summary>
        /// 产品名称
        /// </summary>
        public string ProductName { get; set; } = string.Empty;

        /// <summary>
        /// 产品型号
        /// </summary>
        public string BarCode { get; set; } = string.Empty;

        /// <summary>
        /// 条码示例
        /// </summary>
        public string SNExample { get; set; } = string.Empty;

        /// <summary>
        /// 产品图片数量
        /// </summary>
        public int ImgNum { get; set; }

        ///// <summary>
        ///// 产品任务数量
        ///// </summary>
        //public int TaskNum { get; set; }

        /// <summary>
        /// 产品状态
        /// 0:禁用 1:启用 2:删除
        /// </summary>

        private int _status = 0;
        public int Status
        {
            get { return _status; }
            set
            {
                _status = value;
                OnPropertyChanged();
            }
        }

        ///// <summary>
        ///// 产品状态名称
        ///// </summary>
        //public string StatusName
        //{
        //    get
        //    {
        //        return Status switch
        //        {
        //            0 => "禁用",
        //            1 => "启用",
        //            2 => "删除",
        //            _ => "未知"
        //        };
        //    }
        //}

        private DateTime _createTime = DateTime.Now;
        public DateTime CreateTime
        {
            get { return _createTime; }
            set
            {
                _createTime = value;
                OnPropertyChanged();
            }
        }

        ///// <summary>
        ///// 产品创建者
        ///// </summary>
        //public string Creater { get; set; } = string.Empty;

        ///// <summary>
        ///// 修改时间
        ///// </summary>
        //public string UpdateTime { get; set; } = string.Empty;

        ///// <summary>
        ///// 修改人
        ///// </summary>
        //public string UpdateUser { get; set; } = string.Empty;
    }
}
